package cn.ll.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.GenericGenerator;

/**
 * User entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user", uniqueConstraints = @UniqueConstraint(columnNames = "username"))
public class User implements java.io.Serializable {

	// Fields

	private String id;
	private String username;
	private String password;
	private String departmentid;
	private Integer status;
	private String stuffid;

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String id, String username, String departmentid, Integer status) {
		this.id = id;
		this.username = username;
		this.departmentid = departmentid;
		this.status = status;
	}

	/** full constructor */
	public User(String id, String username, String password,
			String departmentid, Integer status, String stuffid) {
		this.id = id;
		this.username = username;
		this.password = password;
		this.departmentid = departmentid;
		this.status = status;
		this.stuffid = stuffid;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false, length = 36)
	@GeneratedValue(generator = "system-uuid")  
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "username", unique = true, nullable = false, length = 50)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "password", length = 50)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "departmentid", nullable = false, length = 36)
	public String getDepartmentid() {
		return this.departmentid;
	}

	public void setDepartmentid(String departmentid) {
		this.departmentid = departmentid;
	}

	@Column(name = "status", nullable = false)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "stuffid", length = 36)
	public String getStuffid() {
		return this.stuffid;
	}

	public void setStuffid(String stuffid) {
		this.stuffid = stuffid;
	}

}